home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
internet
/
irc_i_dodatki
/
kuang
/
kuangeleven28.lha
/
Rexx
/
CTCP
/
GETSOUND.amirx
< prev
next >
Wrap
Text File
|
1997-03-16
|
865b
|
31 lines
/* K¹¹ Plugin : GETSOUND command to send sounds on ctcp request
* Requires AmIRC 1.30!
*/
options results
parse arg ':'prefix' 'type' 'channel' :'text
parse var prefix nick'!'user'@'host
div='01'x
parse var text (div) command file . (div)
if upper(command)~='GETSOUND' then exit
if file~==compress(file,'/:`"*') then exit
"GETCTCPSOUNDDIR"
fullfile=prsprg(result)||file
if ~exists(fullfile) then cecho('Unable to send' d2c(2)file||d2c(2) 'to' d2c(2)nick||d2c(2))
else do
'SAY /DCC SEND' nick fullfile
cecho('Sent' d2c(2)file||d2c(2) 'to' d2c(2)nick||d2c(2))
end
exit
prsprg:PROCEDURE
x=arg(1)
z=right(x,1)
if z~='/'&z~=':' then x=x||'/'
if upper(left(x,8))='PROGDIR:' then do
y=pragma('d')
z=right(y,1)
if z~='/'&z~=':' then y=y||'/'
if length(x)>8 then return y||substr(x,9);else return y
end
return x
cecho:;"ECHO P="d2c(27)"b«SendSound»" arg(1);return 0